<template>
    <ul>
        <li v-for="i in 4" :key="i" :ref="setDom">{{i}}</li>
    </ul>
</template>

<script>
import { onMounted } from 'vue';

export default {
    setup() {
        const dome=[]
        const setDom=(el)=>{
            console.log(el);
            dome.push(el)
        }
        console.log(dome);
        return {
            dome,
            setDom
        }
    },

}
</script>

<style>

</style>